package com.exercise.module.common.mq;/**
 * Created by kete on 2017-05-19.
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;


/**
 * 作者：kete
 * 创建时间：2017-05-19 15:05
 * 功能描述：
 * 版本：
 */
@Service
public class MqService implements Mq {

    @Autowired
    @Qualifier("activeMqService")
    Mq mq;

    @Override
    public String send(String mqCode, String messageBody) {
        return mq.send(mqCode,messageBody);
    }

    @Override
    public String send(String mqCode, String messageBody, int deliverTime) {
        return mq.send(mqCode,messageBody,deliverTime);
    }

    @Override
    public void subscribe(String mqCode, MqListener mqListener) {

        mq.subscribe(mqCode,mqListener);
    }

    @Override
    public void unSubscribe(String mqCode) {
        mq.unSubscribe(mqCode);
    }
}
